package com.ruoyi.platform.system.verify.controller;

import com.ruoyi.base.annotaion.TokenIgnore;
import com.ruoyi.base.controller.BaseController;
import com.ruoyi.base.pojo.HttpResult;
import com.ruoyi.platform.system.verify.pojo.VerifyCodeDTO;
import com.ruoyi.platform.system.verify.servise.VerifyCodeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 验证码
 *
 * @author lcf
 */
@Api(tags = {"后台登录验证码"})
@RestController
@RequestMapping("/verifyCode")
public class VerifyCodeController extends BaseController {
    @Autowired
    private VerifyCodeService verifyCodeService;
    /**
     * 获取验证码
     */
    @TokenIgnore
    @ApiOperation("获取验证码")
    @GetMapping
    public HttpResult<VerifyCodeDTO> getVerifyCode() {
        return data(verifyCodeService.getVerifyCode());
    }
}
